package com.ersin.sistek.bo.impl;


import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ersin.sistek.bo.SiparisBo;
import com.ersin.sistek.dao.SiparisDao;
import com.ersin.sistek.model.BaseBean;
import com.ersin.sistek.model.SiparisBean;
import com.ersin.sistek.model.SiparisDetayBean;

@Service("siparisBo")
public class SiparisBoImpl implements SiparisBo {

	@Autowired
	SiparisDao siparisDao;

	public void setSiparisDao(SiparisDao siparisDao) {
		this.siparisDao = siparisDao;
	}

	public void save(BaseBean baseBean) {
		siparisDao.save(baseBean);
	}

	public void update(BaseBean baseBean) {
		siparisDao.update(baseBean);
	}

	public void delete(BaseBean baseBean) {
		siparisDao.delete(baseBean);
	}

	public List<SiparisDetayBean> findSiparisDetayById(int id) {
		return siparisDao.findSiparisDetayById(id);
	}

	public List<BaseBean> getAll(int stockCode) {
		// TODO Auto-generated method stub
		List<BaseBean> list = siparisDao.getAll(stockCode);
		return list;
	}

	@Override
	public List<BaseBean> getAllMalzemeList() {
		List<BaseBean> list = siparisDao.getAllMalzemeList();
		return list;
	}

	@Override
	public List<SiparisBean> getSiparisAll(int siparisKoduIlk,
			int siparisKoduSon, Date ilkTar, Date sonTar) {
		List<SiparisBean> list = siparisDao.getSiparisAll(siparisKoduIlk,
				siparisKoduSon, ilkTar, sonTar);
		return list;
	}

}
